import axios from '@/libs/api.request'
import config from '@/config'
/* 首页 专享套餐列表 */
export const getSdkConfig = () => {
  return axios.request({
    url: '/wl/getJsAll',
    type: 'post',
    data: {
      signurl: window.location.href
    },
    php: true
  })
}

export const getPayOptions = (order) => {
  return axios.request({
    url: '/Api/Api/justPay/',
    type: 'post',
    data: {
      signurl: window.location.href,
      extra_param: 98,
      orderid: order
    },
    php: true
  })
}

export const getMediaToOss = (media_id) => {
  return axios.request({
    url: '/Api/Api/getMediaToOss',
    type: 'post',
    data: {
      cid: config.company_code,
      media_id: media_id
    },
    php: true
  })
}
/**
 * 是否是关注用户
 * @returns {Promise<unknown> | AxiosPromise}
 */
export const isSubscribe = () => {
  return axios.request({
    url: '/wl/isSubscribe',
    type: 'get',
    php: true
  })
}
